#include "main.h"

void fun4_symmetry(){
    Polygon<GLint>  triangle;
    triangle.addPoint({20,20});
    triangle.addPoint({140,70});
    triangle.addPoint({70,140});
    glLineWidth(1);

    // 绘制坐标轴
    glColor3f(0,0,0);
    glBegin(GL_LINES);
    glVertex2i(-200,0);
    glVertex2i(200,0);
    glVertex2i(0,-200);
    glVertex2i(0,200);
    glEnd();

    // 第一象限
    triangle.drawEdge();


    // 第二象限
    glPushMatrix();
    glScaled(-1,1,1);
    triangle.drawEdge();
    glPopMatrix();
    // 第三象限
    glPushMatrix();
    glScaled(-1,-1,1);
    triangle.drawEdge();
    glPopMatrix();
    // 第四象限
    glPushMatrix();
    glScaled(1,-1,1);
    triangle.drawEdge();
    glPopMatrix();
}
